package com.yuelan.apartment.service.impl;

import com.yuelan.apartment.domain.RentPayOrder;
import com.yuelan.apartment.domain.RentOrder;
import com.yuelan.apartment.domain.vo.RentPayOrderVo;
import com.yuelan.apartment.domain.vo.RentPaymentsVo;
import com.yuelan.apartment.mapper.RentManageMapper;
import com.yuelan.apartment.service.RentService;
import com.yuelan.apartment.service.TenantService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @description: 租金管理
 * @Author: ZhaoYi
 * @date: 24-6-21 22:33
 */
@Service
public class RentServiceImpl implements RentService {

    @Autowired
    private RentManageMapper rentManageMapper;


    @Transactional
    @Override
    public void createRentOrder(RentOrder rentPayments) {
        RentOrder rentOrder = new RentOrder();
        rentOrder.setApartmentId(rentPayments.getApartmentId());
        rentOrder.setRoomId(rentPayments.getRoomId());
        rentOrder.setTenantId(rentPayments.getTenantId());
        rentOrder.setCollectionTime(rentPayments.getCollectionTime());
        rentOrder.setAmount(rentPayments.getAmount());
        rentOrder.setPaymentType(rentPayments.getPaymentType());
        rentOrder.setStatus(rentPayments.getStatus());
        rentOrder.setCreateTime(rentPayments.getCreateTime());
        rentManageMapper.insertRentOrder(rentOrder);
    }

    @Override
    public List<RentPaymentsVo> rentCollectRecord(RentOrder rentOrder) {
        return null;
    }

    @Override
    public void rentReminder(RentOrder rentOrder) {

    }

    @Override
    public RentPayOrderVo rentPayOrder(RentPayOrder rentPayOrder) {
        return null;
    }

}
